package cn.edu.thu.tsqualitylite.common.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by wangyihan  on 2018/4/22 下午5:39.
 * E-mail address is yihanwang22@163.com.
 * Copyright © 2017 wangyihan. All Rights Reserved.
 *
 * @author wangyihan
 */
public class Algorithms {
  private static Map<String, Class> algorithms;

  static {
    algorithms = new HashMap<>();
    algorithms.put("example", cn.edu.thu.tsquality.core.algorithm.example.SingleMain.class);
    algorithms.put("fan-data-problem-sd", cn.edu.thu.tsquality.core.algorithm.sequential.dependencies.SingleMain.class);
    algorithms.put("fan-data-problem-vc", cn.edu.thu.tsquality.core.algorithm.variance.constraints.SingleMain.class);
    algorithms.put("fan-data-problem-ar", cn.edu.thu.tsquality.core.algorithm.auto.regression.SingleMain.class);
    algorithms.put("fan-data-problem-ma", cn.edu.thu.tsquality.core.algorithm.window.mean.SingleMain.class);
    algorithms.put("fan-data-problem-lr", cn.edu.thu.tsquality.core.algorithm.linear.repair.SingleMain.class);
    algorithms.put("fan-data-problem-cr", cn.edu.thu.tsquality.core.algorithm.columnrepair.SingleMain.class);
    //algorithms.put("fan-data-problem-cr", cn.edu.thu.tsquality.core.algorithm.);

    //    algorithms.put("graph", cn.edu.thu.tsquality.core.algorithm.match.feature.SingleMain.class);
    //    algorithms.put("density", cn.edu.thu.tsquality.core.algorithm.LOF.)
  }

  public static Class getAlgorithm(String name) {
    name = name.toLowerCase();
    return algorithms.get(name);
  }
}
